package forQuest;

public class Demo06 {
    public static void main(String[] args) {
        /*打印5行的三角形
        *            *
        *           ***
        *          *****
        *         *******
        *        *********
        */
        int num = 5;
        for (int i = 1; i <= num; i++) {
            for (int j = i; j <= num; j++) {
                System.out.print(" ");
            }
            for (int j = 1; j <= (i*2)-1; j++) {
                System.out.print("*");
            }
            for (int j = i; j <= num; j++) {
                System.out.print(" ");
            }
            System.out.println();
        }
    }
}
